home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / PROBLEMS / GAWK / KILLCR next >
Text File  |  1992-01-07  |  388b  |  8 lines

  1. if "%0"="" then echo syntax killcr outputfile inputfile
  2. if "%0"="" then echo 
  3. if "%0"="" then error 0 name of outputfile and inputfile needed
  4. if "%1"="" then error 0 name of inputfile needed
  5. type %1 -tabexpand { > /dev/temp }
  6. gawk -v outfile="%0" "BEGIN {f=0;} /^/ { if (f==1) {x=substr($0,2); printf(\"%s\n\",x) > outfile; } else {printf(\"%s\n\",$0) > outfile;f=1;} }" /dev/temp 
  7. *quit
  8.